package com.groupfive.mapper;


import com.groupfive.pojo.Admin;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface AdminMapper {

    List<Admin> selectAll(Admin admin);

    @Select("select * from admin where id = #{id}")
    Admin selectById(Long id);

    int insert(Admin admin);

    int update(Admin admin);

    @Delete("delete from admin where id=#{id}")
    int deleteById(Long id);

    @Select("select * from admin where username = #{username}")
    Admin selectByUsername(String username);
}